package com.ruoyi.site.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单项目对象 order_items
 *
 * @author chuckeytang
 * @date 2025-08-17
 */
public class OrderItems extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单项目ID */
    private Long orderItemId;

    /** 订单ID */
    @Excel(name = "订单ID")
    private Long orderId;

    /** 产品类型 (track, sfx, plan) */
    @Excel(name = "产品类型")
    private String productType;

    /** 购买的音乐ID (如果 productType 是 track) */
    @Excel(name = "音乐ID")
    private Long trackId;

    /** 购买的音效ID (如果 productType 是 sfx) */
    @Excel(name = "音效ID")
    private Long sfxId;

    /** 购买的订阅计划ID (如果 productType 是 plan) */
    @Excel(name = "订阅计划ID")
    private Long planId;

    /** 购买价格 */
    @Excel(name = "购买价格")
    private BigDecimal purchasePrice;

    /** 购买的授权类型/版本 (如: standard, premium) */
    @Excel(name = "授权类型")
    private String licenseOption;

    // --- 关联对象 (用于查询结果展示) ---

    /** 关联的音乐曲目信息 */
    private Tracks track;

    /** 关联的音效信息 */
    private Sfx sfx;

    /** 关联的订阅计划信息 */
    private Plans plan;

    public Long getOrderItemId() {
        return orderItemId;
    }

    public void setOrderItemId(Long orderItemId) {
        this.orderItemId = orderItemId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public Long getTrackId() {
        return trackId;
    }

    public void setTrackId(Long trackId) {
        this.trackId = trackId;
    }

    public Long getSfxId() {
        return sfxId;
    }

    public void setSfxId(Long sfxId) {
        this.sfxId = sfxId;
    }

    public Long getPlanId() {
        return planId;
    }

    public void setPlanId(Long planId) {
        this.planId = planId;
    }

    public BigDecimal getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(BigDecimal purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public Tracks getTrack() {
        return track;
    }

    public void setTrack(Tracks track) {
        this.track = track;
    }

    public Sfx getSfx() {
        return sfx;
    }

    public void setSfx(Sfx sfx) {
        this.sfx = sfx;
    }

    public Plans getPlan() {
        return plan;
    }

    public void setPlan(Plans plan) {
        this.plan = plan;
    }

    public String getLicenseOption() {
        return licenseOption;
    }

    public void setLicenseOption(String licenseOption) {
        this.licenseOption = licenseOption;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("orderItemId", getOrderItemId())
                .append("orderId", getOrderId())
                .append("productType", getProductType())
                .append("trackId", getTrackId())
                .append("sfxId", getSfxId())
                .append("planId", getPlanId())
                .append("purchasePrice", getPurchasePrice())
                .append("licenseOption", getLicenseOption())
                .toString();
    }
}
